package com.p2p.listener;

import com.p2p.model.P2PError;
import com.p2p.model.P2PRoom;
import com.p2p.model.P2PUser;

import java.util.List;

public interface P2PGlobalListener {

    void onInitSuccess();

    void onInitFailure(P2PError error);

    void onRoomCreateSuccess(P2PRoom room);

    void onRoomCreateFailure(P2PRoom room, P2PError error);

    void onLeaveRoomSuccess(P2PRoom room, P2PUser self);

    void onLeaveRoomFailure(P2PRoom room, P2PError error);

    void onGetUserListSuccess(P2PRoom room, List<P2PUser> userList);

    void onGetUserListFailure(P2PRoom room, P2PError error);

    void onGetRoomListSuccess(String groupId, List<P2PRoom> roomList);

    void onGetRoomListFailure(String groupId, P2PError error);

}
